
cap log close
log using "$logs/an-ocr-sensitivity.log", replace
	

	
/********************************************************************************
	Full sample
********************************************************************/
	
	use "$data/1216_countylevel_clean.dta", clear	
	// Merge with sample 
	merge 1:1 countyid using "$data/commonsamp" , nogen
	
	// Merge with covariates
	merge 1:1 countyid using "$data/seda_covariates_clean", nogen 
	
	// Merge with bias
	merge 1:1 countyid using "$data/mrp_data", nogen 

	// Prep data for analysis

		tostring countyid, gen(state)
		assert length(state)==4|length(state)==5
		gen temp = substr(state,1,1) if length(state)==4
		replace temp = substr(state,1,2) if length(state)==5
		drop state
		rename temp state
		destring state, replace
		tab state, gen(state_)
		
		foreach var of varlist *bias {
			egen temp = std(`var')
			replace `var' = temp
			drop temp
			}

		expand 2
		bys countyid: gen black = _n-1
		expand 2
		bys countyid black: gen susp = _n-1
			
		order black susp
		
		gen iss = .
		gen oos = .
		
		foreach var in iss oos {
			replace `var' = `var'_bl_all if black==1 & susp==1
			replace `var' = `var'_wh_all if black==0 & susp==1
			replace `var' = enr_bl_all-`var'_bl_all if black==1 & susp==0
			replace `var' = enr_wh_all-`var'_wh_all if black==0 & susp==0
			}
		
		// Does this look right..?
		bys susp black: sum oos iss

		est clear

		eststo: logit susp black state_* [fw=iss], cluster(countyid)
		eststo: logit susp black all_imp_bias c.all_imp_bias#black state_* [fw=iss], cluster(countyid)
		eststo: logit susp black all_imp_bias c.all_imp_bias#black ///
			sesall ///
			perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
			ppexp_inst stutch_all ///
			flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
			state_* [fw=iss], cluster(countyid)				
			
		eststo: logit susp black state_* [fw=oos], cluster(countyid)
		eststo: logit susp black all_imp_bias c.all_imp_bias#black state_* [fw=oos], cluster(countyid)
		eststo: logit susp black all_imp_bias c.all_imp_bias#black ///
			sesall ///
			perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
			ppexp_inst stutch_all ///
			flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
			state_* [fw=oos], cluster(countyid)		
			
		eststo: logit susp black state_* [fw=iss], cluster(countyid)
		eststo: logit susp black all_exp_bias c.all_exp_bias#black state_* [fw=iss], cluster(countyid)
		eststo: logit susp black all_exp_bias c.all_exp_bias#black ///
			sesall ///
			perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
			ppexp_inst stutch_all ///
			flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
			state_* [fw=iss], cluster(countyid)				
			
		eststo: logit susp black state_* [fw=oos], cluster(countyid)
		eststo: logit susp black all_exp_bias c.all_exp_bias#black state_* [fw=oos], cluster(countyid)
		eststo: logit susp black all_exp_bias c.all_exp_bias#black ///
			sesall ///
			perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
			ppexp_inst stutch_all ///
			flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
			state_* [fw=oos], cluster(countyid)	
			
		esttab using "$output/all-ocr-fullsample.csv", se r2 ar2 drop(state_* sesall ///
			perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
			ppexp_inst stutch_all ///
			flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk) replace note(includes state FE) ///
			star(~ 0.10 * 0.05 ** 0.01 *** 0.001)
			
		keep if tchsamp
		est clear
		
		eststo: logit susp black all_imp_bias c.all_imp_bias#black state_* [fw=iss], cluster(countyid)
		eststo: logit susp black all_imp_bias c.all_imp_bias#black ///
			sesall ///
			perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
			ppexp_inst stutch_all ///
			flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
			state_* [fw=iss], cluster(countyid)				
		eststo: logit susp black state_* [fw=iss], cluster(countyid)
		eststo: logit susp black tch_imp_bias c.tch_imp_bias#black state_* [fw=iss], cluster(countyid)
		eststo: logit susp black tch_imp_bias c.tch_imp_bias#black ///
			sesall ///
			perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
			ppexp_inst stutch_all ///
			flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
			state_* [fw=iss], cluster(countyid)				
			
		eststo: logit susp black all_imp_bias c.all_imp_bias#black state_* [fw=oos], cluster(countyid)
		eststo: logit susp black all_imp_bias c.all_imp_bias#black ///
			sesall ///
			perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
			ppexp_inst stutch_all ///
			flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
			state_* [fw=oos], cluster(countyid)				
		eststo: logit susp black state_* [fw=oos], cluster(countyid)
		eststo: logit susp black tch_imp_bias c.tch_imp_bias#black state_* [fw=oos], cluster(countyid)
		eststo: logit susp black tch_imp_bias c.tch_imp_bias#black ///
			sesall ///
			perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
			ppexp_inst stutch_all ///
			flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
			state_* [fw=oos], cluster(countyid)		

		eststo: logit susp black all_exp_bias c.all_exp_bias#black state_* [fw=iss], cluster(countyid)
		eststo: logit susp black all_exp_bias c.all_exp_bias#black ///
			sesall ///
			perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
			ppexp_inst stutch_all ///
			flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
			state_* [fw=iss], cluster(countyid)				
		eststo: logit susp black state_* [fw=iss], cluster(countyid)
		eststo: logit susp black tch_exp_bias c.tch_exp_bias#black state_* [fw=iss], cluster(countyid)
		eststo: logit susp black tch_exp_bias c.tch_exp_bias#black ///
			sesall ///
			perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
			ppexp_inst stutch_all ///
			flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
			state_* [fw=iss], cluster(countyid)				
			
		eststo: logit susp black all_exp_bias c.all_exp_bias#black state_* [fw=oos], cluster(countyid)
		eststo: logit susp black all_exp_bias c.all_exp_bias#black ///
			sesall ///
			perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
			ppexp_inst stutch_all ///
			flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
			state_* [fw=oos], cluster(countyid)				
		eststo: logit susp black state_* [fw=oos], cluster(countyid)
		eststo: logit susp black tch_exp_bias c.tch_exp_bias#black state_* [fw=oos], cluster(countyid)
		eststo: logit susp black tch_exp_bias c.tch_exp_bias#black ///
			sesall ///
			perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
			ppexp_inst stutch_all ///
			flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
			state_* [fw=oos], cluster(countyid)		
			
		esttab using "$output/tch-ocr-fullsample.csv", se r2 ar2 drop(state_* sesall ///
			perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
			ppexp_inst stutch_all ///
			flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk) replace note(includes state FE) ///
			star(~ 0.10 * 0.05 ** 0.01 *** 0.001)	

/********************************************************************************
	Cluster State
********************************************************************/
	
	use "$data/1216_countylevel_clean.dta", clear
	
	// Merge with sample 
	merge 1:1 countyid using "$data/commonsamp" 
	tab _merge // 51% of counties
	keep if _merge == 3
	drop _merge
	
	// Merge with covariates
	merge 1:1 countyid using "$data/seda_covariates_clean", assert(2 3) nogen keep(3) 
	
	// Merge with bias
	merge 1:1 countyid using "$data/mrp_data", assert(2 3) nogen keep(3)

// Prep data for analysis

	tostring countyid, gen(state)
	assert length(state)==4|length(state)==5
	gen temp = substr(state,1,1) if length(state)==4
	replace temp = substr(state,1,2) if length(state)==5
	drop state
	rename temp state
	destring state, replace
	tab state, gen(state_)
	
	foreach var of varlist *bias {
		egen temp = std(`var')
		replace `var' = temp
		drop temp
		}

	expand 2
	bys countyid: gen black = _n-1
	expand 2
	bys countyid black: gen susp = _n-1
		
	order black susp
	
	gen iss = .
	gen oos = .
	
	foreach var in iss oos {
		replace `var' = `var'_bl_all if black==1 & susp==1
		replace `var' = `var'_wh_all if black==0 & susp==1
		replace `var' = enr_bl_all-`var'_bl_all if black==1 & susp==0
		replace `var' = enr_wh_all-`var'_wh_all if black==0 & susp==0
		}
	
	// Does this look right..?
	bys susp black: sum oos iss
	
/********************************************************************************
	ANALYZE
********************************************************************/

est clear

	eststo: logit susp black state_* [fw=iss], cluster(state)
	eststo: logit susp black all_imp_bias c.all_imp_bias#black state_* [fw=iss], cluster(state)
	eststo: logit susp black all_imp_bias c.all_imp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		state_* [fw=iss], cluster(state)				
		
	eststo: logit susp black state_* [fw=oos], cluster(state)
	eststo: logit susp black all_imp_bias c.all_imp_bias#black state_* [fw=oos], cluster(state)
	eststo: logit susp black all_imp_bias c.all_imp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		state_* [fw=oos], cluster(state)		
		
	eststo: logit susp black state_* [fw=iss], cluster(state)
	eststo: logit susp black all_exp_bias c.all_exp_bias#black state_* [fw=iss], cluster(state)
	eststo: logit susp black all_exp_bias c.all_exp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		state_* [fw=iss], cluster(state)				
		
	eststo: logit susp black state_* [fw=oos], cluster(state)
	eststo: logit susp black all_exp_bias c.all_exp_bias#black state_* [fw=oos], cluster(state)
	eststo: logit susp black all_exp_bias c.all_exp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		state_* [fw=oos], cluster(state)	
		
	esttab using "$output/all-ocr-cluster.csv", se r2 ar2 drop(state_* sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk) replace note(includes state FE) ///
		star(~ 0.10 * 0.05 ** 0.01 *** 0.001)
		
	keep if tchsamp
	est clear
	
	eststo: logit susp black all_imp_bias c.all_imp_bias#black state_* [fw=iss], cluster(state)
	eststo: logit susp black all_imp_bias c.all_imp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		state_* [fw=iss], cluster(state)				
	eststo: logit susp black state_* [fw=iss], cluster(state)
	eststo: logit susp black tch_imp_bias c.tch_imp_bias#black state_* [fw=iss], cluster(state)
	eststo: logit susp black tch_imp_bias c.tch_imp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		state_* [fw=iss], cluster(state)				
		
	eststo: logit susp black all_imp_bias c.all_imp_bias#black state_* [fw=oos], cluster(state)
	eststo: logit susp black all_imp_bias c.all_imp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		state_* [fw=oos], cluster(state)				
	eststo: logit susp black state_* [fw=oos], cluster(state)
	eststo: logit susp black tch_imp_bias c.tch_imp_bias#black state_* [fw=oos], cluster(state)
	eststo: logit susp black tch_imp_bias c.tch_imp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		state_* [fw=oos], cluster(state)		

	eststo: logit susp black all_exp_bias c.all_exp_bias#black state_* [fw=iss], cluster(state)
	eststo: logit susp black all_exp_bias c.all_exp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		state_* [fw=iss], cluster(state)				
	eststo: logit susp black state_* [fw=iss], cluster(state)
	eststo: logit susp black tch_exp_bias c.tch_exp_bias#black state_* [fw=iss], cluster(state)
	eststo: logit susp black tch_exp_bias c.tch_exp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		state_* [fw=iss], cluster(state)				
		
	eststo: logit susp black all_exp_bias c.all_exp_bias#black state_* [fw=oos], cluster(state)
	eststo: logit susp black all_exp_bias c.all_exp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		state_* [fw=oos], cluster(state)				
	eststo: logit susp black state_* [fw=oos], cluster(state)
	eststo: logit susp black tch_exp_bias c.tch_exp_bias#black state_* [fw=oos], cluster(state)
	eststo: logit susp black tch_exp_bias c.tch_exp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		state_* [fw=oos], cluster(state)		
		
	esttab using "$output/tch-ocr-cluster.csv", se r2 ar2 drop(state_* sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk) replace note(includes state FE) ///
		star(~ 0.10 * 0.05 ** 0.01 *** 0.001)				
		
	
/********************************************************************************
	Fixed effects?
********************************************************************/
		
	use "$data/1216_countylevel_clean.dta", clear
	
	// Merge with counties that have SEDA Gap data
	merge 1:1 countyid using "$data/sedagaps", keep(3) nogen
	
	// Merge with sample 
	merge 1:1 countyid using "$data/commonsamp" 
	tab _merge // 76% of counties
	keep if _merge == 3
	drop _merge
	
	// Merge with covariates
	merge 1:1 countyid using "$data/seda_covariates_clean", assert(2 3) nogen keep(3) 
	
	// Merge with bias
	merge 1:1 countyid using "$data/mrp_data", assert(2 3) nogen keep(3)

// Prep data for analysis

	tostring countyid, gen(state)
	assert length(state)==4|length(state)==5
	gen temp = substr(state,1,1) if length(state)==4
	replace temp = substr(state,1,2) if length(state)==5
	drop state
	rename temp state
	destring state, replace
	tab state, gen(state_)
	
		foreach var in tch_imp_bi all_imp_bias all_exp_bias tch_imp_bias tch_exp_bias {
		egen temp = std(`var')
		replace `var' = temp
		drop temp
		}
		
	expand 2
	bys countyid: gen black = _n-1
	expand 2
	bys countyid black: gen susp = _n-1
		
	order black susp
	
	gen iss = .
	gen oos = .
	
	foreach var in iss oos {
		replace `var' = `var'_bl_all if black==1 & susp==1
		replace `var' = `var'_wh_all if black==0 & susp==1
		replace `var' = enr_bl_all-`var'_bl_all if black==1 & susp==0
		replace `var' = enr_wh_all-`var'_wh_all if black==0 & susp==0
		}
	
	// Does this look right..?
	bys susp black: sum oos iss
	
est clear

	
	eststo: logit susp black [fw=iss], cluster(countyid) iterate(50)
	eststo: logit susp black all_imp_bias c.all_imp_bias#black [fw=iss], cluster(countyid) iterate(50)
	eststo: logit susp black all_imp_bias c.all_imp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		[fw=iss], cluster(countyid) iterate(50)				
		
	eststo: logit susp black [fw=oos], cluster(countyid) iterate(50)
	eststo: logit susp black all_imp_bias c.all_imp_bias#black [fw=oos], cluster(countyid) iterate(50)
	eststo: logit susp black all_imp_bias c.all_imp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		[fw=oos], cluster(countyid) iterate(50)		
		
	eststo: logit susp black [fw=iss], cluster(countyid) iterate(50)
	eststo: logit susp black all_exp_bias c.all_exp_bias#black [fw=iss], cluster(countyid) iterate(50)
	eststo: logit susp black all_exp_bias c.all_exp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		[fw=iss], cluster(countyid) iterate(50)				
		
	eststo: logit susp black [fw=oos], cluster(countyid) iterate(50)
	eststo: logit susp black all_exp_bias c.all_exp_bias#black [fw=oos], cluster(countyid) iterate(50)
	eststo: logit susp black all_exp_bias c.all_exp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		[fw=oos], cluster(countyid) iterate(50)	
		
	esttab using "$output/all-ocr-nostatefe.csv", se r2 ar2 drop(sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk) replace note(includes state FE) ///
		star(~ 0.10 * 0.05 ** 0.01 *** 0.001)
		
	keep if tchsamp
	est clear
	
	eststo: logit susp black all_imp_bias c.all_imp_bias#black [fw=iss], cluster(countyid) iterate(50)
	eststo: logit susp black all_imp_bias c.all_imp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		[fw=iss], cluster(countyid) iterate(50)				
	eststo: logit susp black [fw=iss], cluster(countyid) iterate(50)
	eststo: logit susp black tch_imp_bias c.tch_imp_bias#black [fw=iss], cluster(countyid) iterate(50)
	eststo: logit susp black tch_imp_bias c.tch_imp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		[fw=iss], cluster(countyid) iterate(50)				
		
	eststo: logit susp black all_imp_bias c.all_imp_bias#black [fw=oos], cluster(countyid) iterate(50)
	eststo: logit susp black all_imp_bias c.all_imp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		[fw=oos], cluster(countyid) iterate(50)				
	eststo: logit susp black [fw=oos], cluster(countyid) iterate(50)
	eststo: logit susp black tch_imp_bias c.tch_imp_bias#black [fw=oos], cluster(countyid) iterate(50)
	eststo: logit susp black tch_imp_bias c.tch_imp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		[fw=oos], cluster(countyid) iterate(50)		

	eststo: logit susp black all_exp_bias c.all_exp_bias#black [fw=iss], cluster(countyid) iterate(50)
	eststo: logit susp black all_exp_bias c.all_exp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		[fw=iss], cluster(countyid) iterate(50)				
	eststo: logit susp black [fw=iss], cluster(countyid) iterate(50)
	eststo: logit susp black tch_exp_bias c.tch_exp_bias#black [fw=iss], cluster(countyid) iterate(50)
	eststo: logit susp black tch_exp_bias c.tch_exp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		[fw=iss], cluster(countyid) iterate(50)				
		
	eststo: logit susp black all_exp_bias c.all_exp_bias#black [fw=oos], cluster(countyid) iterate(50)
	eststo: logit susp black all_exp_bias c.all_exp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		[fw=oos], cluster(countyid) iterate(50)				
	eststo: logit susp black [fw=oos], cluster(countyid) iterate(50)
	eststo: logit susp black tch_exp_bias c.tch_exp_bias#black [fw=oos], cluster(countyid) iterate(50)
	eststo: logit susp black tch_exp_bias c.tch_exp_bias#black ///
		sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk ///
		[fw=oos], cluster(countyid) iterate(50)		
		
	esttab using "$output/tch-ocr-nostatefe.csv", se r2 ar2 drop(sesall ///
		perblk perhsp /*pctenglish1*/ hswhtblk hsflnfl percharter_all ///
		ppexp_inst stutch_all ///
		flunchwhtblk percharterwhtblk stutchwhtblk seswhtblk) replace note(includes state FE) ///
		star(~ 0.10 * 0.05 ** 0.01 *** 0.001)		
		
log close
